﻿using System;
using System.Collections.Generic;
using Gp.Scripts.Equip;
using Gp.Scripts.Core;
using Gp.Scripts.Core.Unit;

namespace Gp.Scripts.Data {
    public struct UnitAbilityContext {
        public SkillEntity SkillEntity { get; }
        public IReadOnlyList<BaseUnit> Targets { get; }
        
        public IReadOnlyList<BaseUnit> Friends { get; }

        public UnitAbilityContext(SkillEntity skill, IReadOnlyList<BaseUnit> targets, IReadOnlyList<BaseUnit> friends) {
            SkillEntity = skill;
            Targets = targets;
            Friends = friends;
        }
    }


    [Serializable]
    public abstract class BaseWeaponType {
        /// <summary>
        /// 当创建对象时调用，初始化
        /// </summary>
        public virtual void OnBuild(ConfigWeapon equip) { }

        public abstract WeaponTypeInfo BuildInfo(WeaponEntity entity);

        public abstract WeaponBasicType WeaponBasicType { get; }
    }
}